<?php

namespace app\model;

use think\Model;

class User extends Model
{
    protected $pk = 'id';

    protected $name = 'user';

//    public $status = [1=>'正常',2=>'禁用'];
//
//    public function getStatusAttr($value)
//    {
//        return $this->status[$value];
//    }

    public function withUserInfo()
    {
        return $this->hasOne(UserInfo::class, 'uid', 'id');
    }

}
